<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <title>template</title>
  </head>
  <body>
    <button onclick="ed.open();">打开编辑</button>
    <button onclick="ed.close();">关闭编辑</button>
    <h1 style="text-align:center;font-size:48px;padding:20px;">地图</h1>
    <div id="mapDiv" style="height:600px;width:800px;margin:auto;"></div>
    <script src="http://api.map.baidu.com/api?v=2.0&ak=0WF4D7OmWBQ0CGIdVXS8rmpk" type="text/javascript"></script>
    <script src="../js/raphael.js"></script>
    <script src="../js/LMap.js"></script>
    <script>
      var map = new LMap.Map('mapDiv');
      map.centerAndZoom(new LMap.Point(116.404, 39.915),15);
      var a = new LMap.Curve([
        new LMap.CurveCommand('M',[
          new LMap.Point(116.404,39.915)
        ]),
        new LMap.CurveCommand('C',[
          new LMap.Point(116.404, 39.905),
          new LMap.Point(116.414, 39.905),
          new LMap.Point(116.414, 39.915)
        ]),
        new LMap.CurveCommand('C',[
          new LMap.Point(116.414, 39.925),
          new LMap.Point(116.424, 39.925),
          new LMap.Point(116.424, 39.915)
        ])
      ]);
//      var b = new LMap.Curve([
//        new LMap.CurveCommand('M',[
//          new LMap.Point(116.404,39.915)
//        ]),
//        new LMap.CurveCommand('C',[
//          new LMap.Point(116.404, 39.905),
//          new LMap.Point(116.414, 39.905),
//          new LMap.Point(116.414, 39.915)
//        ]),
//        new LMap.CurveCommand('C',[
//          new LMap.Point(116.414, 39.905),
//          new LMap.Point(116.424, 39.905),
//          new LMap.Point(116.424, 39.915)
//        ])
//      ]);
      map.addOverlay(a);
      //console.log(BMAP_NORMAL_MAP);
      var ed = new LMap.Editor();
      ed.edit(a);
      //ed.edit(b);
//      for(var i in map.getPanes()){
//        console.log(i);
//        console.log(map.getPanes()[i]);
//      }
      
    </script>
  </body>
</html>